Gravity v4 - #1235
Merged
Merged
Conversation
…l errors in test values that appeared in test_flight_path_ode.py due to the use of altitude_rate.py and its english 32.2ft/s**2 to metric 9.81m/s**2 conversion that is now enforced by openmdao to be a conversion from 32.2ft/s**2 to 9.81456m/s**2
ehariton
marked this pull request as ready for review
July 15, 2026 16:55
cmbenne3
requested changes
Jul 16, 2026
cmbenne3
reviewed
Jul 16, 2026
jkirk5
reviewed
Jul 28, 2026
| g = constants.GRAV_EARTH1[0] | ||
| radius_earth = constants.RADIUS_EARTH[0] # meters | ||
| if constants.RADIUS_EARTH[1] != 'm': | ||
| if constants.RADIUS_EARTH[1] != 'm' or constants.GRAV_EARTH1[1] != 'm/s**2': |
Contributor
There was a problem hiding this comment.
We can just convert units if they aren't what we expected
from openmdao.utils.units import convert_units
convert_units(val, old_units, new_units)
I'm not sure why we need to check that our hardcoded constants have their expected units to begin with though
Contributor
Author
There was a problem hiding this comment.
I added the convert_units function as requested. the equations inside of this helper function require particular units on input and can't convert on their own.
cmbenne3
approved these changes
Aug 7, 2026
jkirk5
approved these changes
Aug 10, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 10, 2026
Merged
…rth conversion implemented in propulsion.utils.py but not garanteed
…duces those values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All gravity constants are now uniform and encapsulated in constants.py . The differences between FLOPS and GASP gravities have been eliminated.
Follow on to #1219, #1227, #1232.
Removes GRAV_ENGLISH_GASP and replaces with Mission.GRAVITY.
One reference to GNS as gravity in a standard python function was not replaced because this function seems to be trying to account for the rotation rate of the earth as well, so we just left it alone and put some warnings around it indicating it won't work for non-earth planets.
Related Issues
Resolves #1192
Backwards incompatibilities
None
AI Usage
None.